Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AuthenticationApiService
- func (a *AuthenticationApiService) AuthenticateWithProvider(ctx _context.Context, moovAuthn string, origin string, providerID string) (string, *_nethttp.Response, error)
- func (a *AuthenticationApiService) FinishSignupFlow(ctx _context.Context, moovAuthn string, origin string, ...) (string, *_nethttp.Response, error)
- func (a *AuthenticationApiService) FinishTenantFlow(ctx _context.Context, tenantID string) (string, *_nethttp.Response, error)
- func (a *AuthenticationApiService) StartSignupFlow(ctx _context.Context) (StartSignup, *_nethttp.Response, error)
- func (a *AuthenticationApiService) StartTenantFlow(ctx _context.Context, tenantID string) (SigninTenant, *_nethttp.Response, error)
- type BasicAuth
- type Configuration
- type Credential
- type CredentialsApiService
- type FinishSignup
- type FinishSignupErrors
- type GenericOpenAPIError
- type Provider
- type ServerConfiguration
- type ServerVariable
- type SigninTenant
- type SignupIdentity
- type SignupIdentityErrors
- type SignupTenant
- type SignupTenantErrors
- type StartSignup
- type Tenant
- type TenantsApiService
- func (a *TenantsApiService) GetTenant(ctx _context.Context, tenantID string) (Tenant, *_nethttp.Response, error)
- func (a *TenantsApiService) ListTenants(ctx _context.Context) ([]Tenant, *_nethttp.Response, error)
- func (a *TenantsApiService) UpdateTenant(ctx _context.Context, tenantID string, updateTenant UpdateTenant) (Tenant, *_nethttp.Response, error)
- type UpdateTenant
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { AuthenticationApi *AuthenticationApiService CredentialsApi *CredentialsApiService TenantsApi *TenantsApiService // contains filtered or unexported fields }
APIClient manages communication with the AuthN API API v0.0.1 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type AuthenticationApiService ¶
type AuthenticationApiService service
AuthenticationApiService AuthenticationApi service
func (*AuthenticationApiService) AuthenticateWithProvider ¶
func (a *AuthenticationApiService) AuthenticateWithProvider(ctx _context.Context, moovAuthn string, origin string, providerID string) (string, *_nethttp.Response, error)
AuthenticateWithProvider Initiates the authentication with the Provider specified by `providerID`. This can have many possible responses depending on the specific provider being used.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param moovAuthn
- @param origin
- @param providerID Name of the Provider to use which comes from the tenant config.
@return string
func (*AuthenticationApiService) FinishSignupFlow ¶
func (a *AuthenticationApiService) FinishSignupFlow(ctx _context.Context, moovAuthn string, origin string, finishSignup FinishSignup) (string, *_nethttp.Response, error)
FinishSignupFlow Finalizes the signup flow and creates the new org.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param moovAuthn
- @param origin
- @param finishSignup Arguments needed register a user with OIDC credentials.
@return string
func (*AuthenticationApiService) FinishTenantFlow ¶
func (a *AuthenticationApiService) FinishTenantFlow(ctx _context.Context, tenantID string) (string, *_nethttp.Response, error)
FinishTenantFlow Verifies and finishes the tenant login flow.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param tenantID Which tenant to log into.
@return string
func (*AuthenticationApiService) StartSignupFlow ¶
func (a *AuthenticationApiService) StartSignupFlow(ctx _context.Context) (StartSignup, *_nethttp.Response, error)
StartSignupFlow Landing page to show moov signup page.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return StartSignup
func (*AuthenticationApiService) StartTenantFlow ¶
func (a *AuthenticationApiService) StartTenantFlow(ctx _context.Context, tenantID string) (SigninTenant, *_nethttp.Response, error)
StartTenantFlow Page that lists all the available providers that can be used to authenticate with that tenant.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param tenantID Which tenant to log into.
@return SigninTenant
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type Credential ¶
type Credential struct { // UUID v4 CredentialID string `json:"credentialID,omitempty"` // OIDC provider that was used to handle authentication of this user. ProviderID string `json:"providerID,omitempty"` // ID of the remote OIDC server gives to this identity SubjectID string `json:"subjectID,omitempty"` // Email Address Email string `json:"email,omitempty"` CreatedOn time.Time `json:"createdOn,omitempty"` LastUsedOn time.Time `json:"lastUsedOn,omitempty"` DisabledOn *time.Time `json:"disabledOn,omitempty"` // UUID v4 DisabledBy *string `json:"disabledBy,omitempty"` }
Credential Description of a successful OpenID connect credential
type CredentialsApiService ¶
type CredentialsApiService service
CredentialsApiService CredentialsApi service
func (*CredentialsApiService) GetCredentials ¶
func (a *CredentialsApiService) GetCredentials(ctx _context.Context, credentialID string) (Credential, *_nethttp.Response, error)
GetCredentials Get a credential.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param credentialID ID of the credential to disable
@return Credential
type FinishSignup ¶
type FinishSignup struct { Identity SignupIdentity `json:"identity,omitempty"` Tenant SignupTenant `json:"tenant,omitempty"` }
FinishSignup Returns the available login options for signing up
func (FinishSignup) Validate ¶
func (a FinishSignup) Validate() error
type FinishSignupErrors ¶
type FinishSignupErrors struct { Identity SignupIdentityErrors `json:"identity,omitempty"` Tenant SignupTenantErrors `json:"tenant,omitempty"` }
FinishSignupErrors Returns the available login options for signing up
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type Provider ¶
type Provider struct { // OIDC provider that was used to handle authentication of this user. ProviderID string `json:"providerID,omitempty"` // Descriptive name allowing spaces. Description string `json:"description,omitempty"` // Descriptive name allowing spaces. Service string `json:"service,omitempty"` Path string `json:"path,omitempty"` }
Provider Attributes about a provider that is used to login
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
type SigninTenant ¶ added in v0.2.3
type SigninTenant struct { // UUID v4 TenantID string `json:"tenantID,omitempty"` // Descriptive name allowing spaces. Name string `json:"name,omitempty"` Alias string `json:"alias,omitempty"` Website string `json:"website,omitempty"` Providers []Provider `json:"providers,omitempty"` }
SigninTenant Description of a tenant / organization including name and allowed providers.
type SignupIdentity ¶
type SignupIdentity struct { FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` // Email Address Email string `json:"email,omitempty"` }
SignupIdentity Request to register a user in the system
func (SignupIdentity) Validate ¶
func (a SignupIdentity) Validate() error
type SignupIdentityErrors ¶
type SignupIdentityErrors struct { // Descriptive reason for failing validation FirstName string `json:"firstName,omitempty"` // Descriptive reason for failing validation LastName string `json:"lastName,omitempty"` // Descriptive reason for failing validation Email string `json:"email,omitempty"` }
SignupIdentityErrors Request to register a user in the system
type SignupTenant ¶
type SignupTenant struct { // Descriptive name allowing spaces. Name string `json:"name,omitempty"` Alias string `json:"alias,omitempty"` Website string `json:"website,omitempty"` }
SignupTenant Description of a tenant / organization including name and allowed providers.
func (SignupTenant) Validate ¶
func (a SignupTenant) Validate() error
type SignupTenantErrors ¶
type SignupTenantErrors struct { // Descriptive reason for failing validation Name string `json:"name,omitempty"` // Descriptive reason for failing validation Alias string `json:"alias,omitempty"` // Descriptive reason for failing validation Website string `json:"website,omitempty"` }
SignupTenantErrors Description of a tenant / organization including name and allowed providers.
type StartSignup ¶
type StartSignup struct {
Providers []Provider `json:"providers,omitempty"`
}
StartSignup Returns the available login options for signing up
type Tenant ¶
type Tenant struct { // UUID v4 TenantID string `json:"tenantID,omitempty"` CreatedOn time.Time `json:"createdOn,omitempty"` // UUID v4 CreatedBy string `json:"createdBy,omitempty"` LastUpdatedOn time.Time `json:"lastUpdatedOn,omitempty"` // UUID v4 LastUpdatedBy string `json:"lastUpdatedBy,omitempty"` // Descriptive name allowing spaces. Name string `json:"name,omitempty"` Alias string `json:"alias,omitempty"` Website string `json:"website,omitempty"` Providers []string `json:"providers,omitempty"` }
Tenant Description of a tenant / organization including name and allowed providers.
type TenantsApiService ¶ added in v0.2.3
type TenantsApiService service
TenantsApiService TenantsApi service
func (*TenantsApiService) GetTenant ¶ added in v0.2.3
func (a *TenantsApiService) GetTenant(ctx _context.Context, tenantID string) (Tenant, *_nethttp.Response, error)
GetTenant Returns details about the Tenant
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param tenantID ID of the Tenant to lookup
@return Tenant
func (*TenantsApiService) ListTenants ¶ added in v0.2.3
ListTenants List the tenants available to the user under the credentials they used to sign in
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Tenant
func (*TenantsApiService) UpdateTenant ¶ added in v0.2.3
func (a *TenantsApiService) UpdateTenant(ctx _context.Context, tenantID string, updateTenant UpdateTenant) (Tenant, *_nethttp.Response, error)
UpdateTenant Update details about a Tenant
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param tenantID ID of the Tenant to lookup
- @param updateTenant Attributes about a tenant that to be updated.
@return Tenant
type UpdateTenant ¶ added in v0.2.3
type UpdateTenant struct { // Descriptive name allowing spaces. Name string `json:"name,omitempty"` Alias string `json:"alias,omitempty"` Website string `json:"website,omitempty"` Providers []string `json:"providers,omitempty"` }
UpdateTenant Description of a tenant / organization including name and allowed providers.
Source Files
¶
- api_authentication.go
- api_credentials.go
- api_tenants.go
- client.go
- configuration.go
- model_credential.go
- model_finish_signup.go
- model_finish_signup_errors.go
- model_provider.go
- model_signin_tenant.go
- model_signup_identity.go
- model_signup_identity_errors.go
- model_signup_tenant.go
- model_signup_tenant_errors.go
- model_start_signup.go
- model_tenant.go
- model_update_tenant.go
- response.go
- validation.go