Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Set = wire.NewSet( wire.Struct(new(Authentication), "*"), wire.Bind(new(Interface), new(*Authentication)), wire.Struct(new(authcode.Browser), "*"), wire.Struct(new(authcode.Keyboard), "*"), wire.Struct(new(ropc.ROPC), "*"), wire.Struct(new(devicecode.DeviceCode), "*"), )
Set provides the use-case of Authentication.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct {
ClientFactory client.FactoryInterface
Logger logger.Interface
AuthCodeBrowser *authcode.Browser
AuthCodeKeyboard *authcode.Keyboard
ROPC *ropc.ROPC
DeviceCode *devicecode.DeviceCode
}
Authentication provides the internal use-case of authentication.
If the IDToken is not set, it performs the authentication flow. If the IDToken is valid, it does nothing. If the IDtoken has expired and the RefreshToken is set, it refreshes the token. If the RefreshToken has expired, it performs the authentication flow.
The authentication flow is determined as:
If the Username is not set, it performs the authorization code flow. Otherwise, it performs the resource owner password credentials flow. If the Password is not set, it asks a password by the prompt.
type GrantOptionSet ¶
type GrantOptionSet struct {
AuthCodeBrowserOption *authcode.BrowserOption
AuthCodeKeyboardOption *authcode.KeyboardOption
ROPCOption *ropc.Option
DeviceCodeOption *devicecode.Option
}
Click to show internal directories.
Click to hide internal directories.