Authlete API Document.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 2.3.12
- Package version: 2.3
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import authlete "github.com/authlete/openapi-for-go"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), authlete.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), authlete.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), authlete.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), authlete.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://api.authlete.com
Class | Method | HTTP request | Description |
---|---|---|---|
AuthorizationEndpointApi | AuthAuthorizationApi | Post /api/auth/authorization | /api/auth/authorization API |
AuthorizationEndpointApi | AuthAuthorizationFailApi | Post /api/auth/authorization/fail | /api/auth/authorization/fail API |
AuthorizationEndpointApi | AuthAuthorizationIssueApi | Post /api/auth/authorization/issue | /api/auth/authorization/issue API |
CIBAApi | BackchannelAuthenticationApi | Post /api/backchannel/authentication | /api/backchannel/authentication API |
CIBAApi | BackchannelAuthenticationCompleteApi | Post /api/backchannel/authentication/complete | /api/backchannel/authentication/complete API |
CIBAApi | BackchannelAuthenticationFailApi | Post /api/backchannel/authentication/fail | /api/backchannel/authentication/fail API |
CIBAApi | BackchannelAuthenticationIssueApi | Post /api/backchannel/authentication/issue | /api/backchannel/authentication/issue API |
ClientExtensionApi | ClientExtensionRequestablesScopesDeleteApi | Delete /api/client/extension/requestable_scopes/delete/{clientId} | /api/client/extension/requestable_scopes/delete/{clientId} API |
ClientExtensionApi | ClientExtensionRequestablesScopesGetApi | Get /api/client/extension/requestable_scopes/get/{clientId} | /api/client/extension/requestable_scopes/get/{clientId} API |
ClientExtensionApi | ClientExtensionRequestablesScopesUpdateApi | Put /api/client/extension/requestable_scopes/update/{clientId} | /api/client/extension/requestable_scopes/update/{clientId} API |
ClientManagementApi | ClientAuthorizationDeleteApi | Delete /api/client/authorization/delete/{clientId} | /api/client/authorization/delete/{clientId}/{subject} API |
ClientManagementApi | ClientAuthorizationGetListApi | Get /api/client/authorization/get/list | /api/client/authorization/get/list/{subject} API |
ClientManagementApi | ClientAuthorizationUpdateApi | Post /api/client/authorization/update/{clientId} | /api/client/authorization/update/{clientId} API |
ClientManagementApi | ClientCreateApi | Post /api/client/create | /api/client/create API |
ClientManagementApi | ClientDeleteApi | Delete /api/client/delete/{clientId} | /api/client/delete/{clientId} API |
ClientManagementApi | ClientFlagUpdateApi | Post /api/client/lock_flag/update/{clientIdentifier} | /api/client/lock_flag/update/{clientIdentifier} API |
ClientManagementApi | ClientGetApi | Get /api/client/get/{clientId} | /api/client/get/{clientId} API |
ClientManagementApi | ClientGetListApi | Get /api/client/get/list | /api/client/get/list API |
ClientManagementApi | ClientGrantedScopesDeleteApi | Delete /api/client/granted_scopes/delete/{clientId} | /api/client/granted_scopes/delete/{clientId}/{subject} API |
ClientManagementApi | ClientGrantedScopesGetApi | Get /api/client/granted_scopes/get/{clientId} | /api/client/granted_scopes/get/{clientId}/{subject} API |
ClientManagementApi | ClientSecretRefreshApi | Get /api/client/secret/refresh/{clientIdentifier} | /api/client/secret/refresh API |
ClientManagementApi | ClientSecretUpdateApi | Post /api/client/secret/update/{clientIdentifier} | /api/client/secret/update API |
ClientManagementApi | ClientUpdateApi | Post /api/client/update/{clientId} | /api/client/update/{clientId} API |
ConfigurationEndpointApi | ServiceConfigurationApi | Get /api/service/configuration | /api/service/configuration API |
DefaultApi | MiscEchoApi | Get /api/misc/echo | /api/misc/echo API |
DeviceFlowApi | DeviceAuthorizationApi | Post /api/device/authorization | /api/device/authorization API |
DeviceFlowApi | DeviceCompleteApi | Post /api/device/complete | /api/device/complete API |
DeviceFlowApi | DeviceVerificationApi | Post /api/device/verification | /api/device/verification API |
DynamicClientRegistrationApi | ClientRegistrationApi | Post /api/client/registration | /api/client/registration API |
DynamicClientRegistrationApi | ClientRegistrationDeleteApi | Post /api/client/registration/delete | /api/client/registration/delete API |
DynamicClientRegistrationApi | ClientRegistrationGetApi | Post /api/client/registration/get | /api/client/registration/get API |
DynamicClientRegistrationApi | ClientRegistrationUpdateApi | Post /api/client/registration/update | /api/client/registration/update API |
FederationEndpointApi | FederationConfigurationApi | Post /api/federation/configuration | /api/federation/configuration API |
FederationEndpointApi | FederationRegistrationApi | Post /api/federation/registration | /api/federation/registration API |
GrantManagementEndpointApi | GrantMApi | Post /api/gm | /api/gm API |
HskOperationsApi | HskCreateApi | Post /api/hsk/create | /api/hsk/create API |
HskOperationsApi | HskDeleteApi | Delete /api/hsk/delete/{handle} | /api/hsk/delete/{handle} API |
HskOperationsApi | HskGetApi | Get /api/hsk/get/{handle} | /api/hsk/get/{handle} API |
HskOperationsApi | HskGetListApi | Get /api/hsk/get/list | /api/hsk/get/list API |
IDTokenEndpointApi | IdtokenReissueApi | Post /api/idtoken/reissue | /api/idtoken/reissue API |
IntrospectionEndpointApi | AuthIntrospectionApi | Post /api/auth/introspection | /api/auth/introspection API |
IntrospectionEndpointApi | AuthIntrospectionStandardApi | Post /api/auth/introspection/standard | /api/auth/introspection/standard API |
JWKSetEndpointApi | ServiceJwksGetApi | Get /api/service/jwks/get | /api/service/jwks/get API |
JoseObjectApi | JoseVerifyApi | Post /api/jose/verify | /api/jose/verify API |
PushedAuthorizationEndpointApi | PushedAuthReqApi | Post /api/pushed_auth_req | /api/pushed_auth_req API |
RevocationEndpointApi | AuthRevocationApi | Post /api/auth/revocation | /api/auth/revocation API |
ServerMetadataApi | InfoApi | Get /api/info | /api/info API |
ServiceManagementApi | ServiceCreateApi | Post /api/service/create | /api/service/create API |
ServiceManagementApi | ServiceDeleteApi | Delete /api/service/delete/{serviceApiKey} | /api/service/delete/{serviceApiKey} API |
ServiceManagementApi | ServiceGetApi | Get /api/service/get/{serviceApiKey} | /api/service/get/{serviceApiKey} API |
ServiceManagementApi | ServiceGetListApi | Get /api/service/get/list | /api/service/get/list API |
ServiceManagementApi | ServiceUpdateApi | Post /api/service/update/{serviceApiKey} | /api/service/update/{serviceApiKey} API |
TokenEndpointApi | AuthTokenApi | Post /api/auth/token | /api/auth/token API |
TokenEndpointApi | AuthTokenFailApi | Post /api/auth/token/fail | /api/auth/token/fail API |
TokenEndpointApi | AuthTokenIssueApi | Post /api/auth/token/issue | /api/auth/token/issue API |
TokenOperationsApi | AuthTokenCreateApi | Post /api/auth/token/create | /api/auth/token/create API |
TokenOperationsApi | AuthTokenDeleteApi | Delete /api/auth/token/delete/{accessTokenIdentifier} | /api/auth/token/delete API |
TokenOperationsApi | AuthTokenGetListApi | Get /api/auth/token/get/list | /api/auth/token/get/list API |
TokenOperationsApi | AuthTokenRevokeApi | Post /api/auth/token/revoke | /api/auth/token/revoke API |
TokenOperationsApi | AuthTokenUpdateApi | Post /api/auth/token/update | /api/auth/token/update API |
UserInfoEndpointApi | AuthUserinfoApi | Post /api/auth/userinfo | /api/auth/userinfo API |
UserInfoEndpointApi | AuthUserinfoIssueApi | Post /api/auth/userinfo/issue | /api/auth/userinfo/issue API |
- AccessToken
- ApplicationType
- AttachmentType
- AuthorizationDetails
- AuthorizationDetailsElement
- AuthorizationFailRequest
- AuthorizationFailResponse
- AuthorizationIssueRequest
- AuthorizationIssueResponse
- AuthorizationRequest
- AuthorizationResponse
- AuthzDetails
- BackchannelAuthenticationCompleteRequest
- BackchannelAuthenticationCompleteResponse
- BackchannelAuthenticationFailRequest
- BackchannelAuthenticationFailResponse
- BackchannelAuthenticationIssueRequest
- BackchannelAuthenticationIssueResponse
- BackchannelAuthenticationRequest
- BackchannelAuthenticationResponse
- ClaimType
- Client
- ClientAuthMethod
- ClientAuthenticationMethod
- ClientAuthorizationDeleteResponse
- ClientAuthorizationGetListResponse
- ClientAuthorizationUpdateRequest
- ClientAuthorizationUpdateResponse
- ClientExtension
- ClientExtensionRequestableScopesGetResponse
- ClientExtensionRequestableScopesUpdateRequest
- ClientExtensionRequestableScopesUpdateResponse
- ClientFlagUpdateRequest
- ClientFlagUpdateResponse
- ClientGetListResponse
- ClientGrantedScopesDeleteResponse
- ClientGrantedScopesGetResponse
- ClientRegistrationDeleteRequest
- ClientRegistrationDeleteResponse
- ClientRegistrationGetRequest
- ClientRegistrationGetResponse
- ClientRegistrationRequest
- ClientRegistrationResponse
- ClientRegistrationType
- ClientRegistrationUpdateRequest
- ClientRegistrationUpdateResponse
- ClientSecretRefreshResponse
- ClientSecretUpdateRequest
- ClientSecretUpdateResponse
- ClientType
- DeliveryMode
- DeviceAuthorizationRequest
- DeviceAuthorizationResponse
- DeviceCompleteRequest
- DeviceCompleteResponse
- DeviceVerificationRequest
- DeviceVerificationResponse
- Display
- DynamicScope
- FederationConfigurationResponse
- FederationRegistrationRequest
- FederationRegistrationResponse
- GMRequest
- GMResponse
- Grant
- GrantManagementAction
- GrantScope
- GrantType
- Hsk
- HskCreateRequest
- HskCreateResponse
- HskDeleteResponse
- HskGetListResponse
- HskGetResponse
- IdtokenReissueRequest
- IdtokenReissueResponse
- InfoResponse
- IntrospectionRequest
- IntrospectionResponse
- JoseVerifyRequest
- JoseVerifyResponse
- JweAlg
- JweEnc
- JwsAlg
- NamedUri
- Pair
- Prompt
- Property
- PushedAuthorizationRequest
- PushedAuthorizationResponse
- ResponseType
- Result
- RevocationRequest
- RevocationResponse
- Scope
- Service
- ServiceGetListResponse
- ServiceJwksGetResponse
- ServiceProfile
- Sns
- SnsCredentials
- StandardIntrospectionRequest
- StandardIntrospectionResponse
- SubjectType
- TaggedValue
- TokenCreateRequest
- TokenCreateResponse
- TokenFailRequest
- TokenFailResponse
- TokenGetListResponse
- TokenInfo
- TokenIssueRequest
- TokenIssueResponse
- TokenRequest
- TokenResponse
- TokenRevokeRequest
- TokenRevokeResponse
- TokenType
- TokenUpdateRequest
- TokenUpdateResponse
- TrustAnchor
- UserCodeCharset
- UserinfoIssueRequest
- UserinfoIssueResponse
- UserinfoRequest
- UserinfoResponse
- VerifiedClaimsValidationSchema
- Type: HTTP basic authentication
Example
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
- Type: HTTP basic authentication
Example
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime