Documentation ¶
Index ¶
- Constants
- func GenerateNonce() string
- func VerifyProvider(name string) error
- type Data
- type Provider
- func ConvertGothProviderToOktaProvider(gothProvider goth.Provider) (*Provider, error)
- func GetOktaProviderForRequest(r *http.Request) (*Provider, error)
- func NewOktaProvider(logger *zap.Logger) *Provider
- func NewProvider(orgURL string, callbackURL string, clientID string, secret string) *Provider
- func WrapOktaProvider(provider *gothOkta.Provider, orgURL string, clientID string, secret string, ...) *Provider
- func (op *Provider) AuthorizationURL(r *http.Request) (*Data, error)
- func (op *Provider) GetAuthURL() string
- func (op *Provider) GetCallbackURL() string
- func (op *Provider) GetClientID() string
- func (op *Provider) GetCreateAccountURL(activate string) string
- func (op *Provider) GetCreateUserURL(activate string) string
- func (op *Provider) GetIssuerURL() string
- func (op *Provider) GetJWKSURL() string
- func (op *Provider) GetLogoutURL() string
- func (op *Provider) GetOpenIDConfigURL() string
- func (op *Provider) GetOrgURL() string
- func (op *Provider) GetRevokeURL() string
- func (op *Provider) GetSecret() string
- func (op *Provider) GetSessionsURL() string
- func (op *Provider) GetTokenURL() string
- func (op *Provider) GetUserInfoURL() string
- func (op *Provider) GetUserURL(oktaUserID string) string
- func (op *Provider) RegisterOktaProvider(name string, orgURL string, callbackURL string, clientID string, secret string, ...) error
- func (op *Provider) RegisterProviders(v *viper.Viper) error
- func (op *Provider) SetCallbackURL(URL string)
- func (op *Provider) SetClientID(ID string)
- func (op *Provider) SetOrgURL(orgURL string)
- func (op *Provider) SetSecret(secret string)
- func (op Provider) TokenURL(r *http.Request) string
Constants ¶
const AdminProviderName = "adminProvider"
const MilProviderName = "milProvider"
const OfficeProviderName = "officeProvider"
Variables ¶
This section is empty.
Functions ¶
func GenerateNonce ¶
func GenerateNonce() string
func VerifyProvider ¶
Check if the provided provider name exists
Types ¶
type Provider ¶
This provider struct will be unique to mil, office, and admin. When you run goth.getProvider() you'll now have the orgURL, clientID, and secret on hand
func GetOktaProviderForRequest ¶
This function will select the correct provider to use based on its set name.
func NewOktaProvider ¶
func NewProvider ¶
NewProvider creates a new instance of the Okta provider with the specified orgURL
func WrapOktaProvider ¶
func WrapOktaProvider(provider *gothOkta.Provider, orgURL string, clientID string, secret string, callbackURL string, logger *zap.Logger) *Provider
This function allows us to wrap new registered providers with the zap logger. The initial Okta provider is already wrapped This will wrap the gothOkta provider with our own version of OktaProvider (With added methods)
func (*Provider) AuthorizationURL ¶
This function will use the OktaProvider to return the correct authorization URL to use
func (*Provider) GetAuthURL ¶
func (*Provider) GetCallbackURL ¶
func (*Provider) GetClientID ¶
func (*Provider) GetCreateAccountURL ¶
func (*Provider) GetCreateUserURL ¶
func (*Provider) GetIssuerURL ¶
func (*Provider) GetJWKSURL ¶
func (*Provider) GetLogoutURL ¶
func (*Provider) GetOpenIDConfigURL ¶
func (*Provider) GetRevokeURL ¶
func (*Provider) GetSessionsURL ¶
func (*Provider) GetTokenURL ¶
func (*Provider) GetUserInfoURL ¶
func (*Provider) GetUserURL ¶
func (*Provider) RegisterOktaProvider ¶
func (op *Provider) RegisterOktaProvider(name string, orgURL string, callbackURL string, clientID string, secret string, scope []string) error
Create a new Okta provider and register it under the Goth providers
func (*Provider) RegisterProviders ¶
Function to register all three providers at once.