Documentation
¶
Overview ¶
* Authorisation API * * The subset of the [Authentication API as defined by EBSI](https://api-pilot.ebsi.eu/docs/apis/authorisation/latest#/). * * API version: v4 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Authorisation API * * The subset of the [Authentication API as defined by EBSI](https://api-pilot.ebsi.eu/docs/apis/authorisation/latest#/). * * API version: v4 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Constants
- Variables
- func AuthorizationEndpoint(c *gin.Context)
- func GetRequestByReference(c *gin.Context)
- func GetToken(c *gin.Context)
- func GetTokenForService(c *gin.Context)
- func GetVerifierAPIAuthenticationResponse(c *gin.Context)
- func Index(c *gin.Context)
- func NewRouter() *gin.Engine
- func StartSIOPSameDevice(c *gin.Context)
- func VerifierAPIAuthenticationResponse(c *gin.Context)
- func VerifierAPIJWKS(c *gin.Context)
- func VerifierAPIOpenIDConfiguration(c *gin.Context)
- func VerifierAPIStartSIOP(c *gin.Context)
- func VerifierLoginQr(c *gin.Context)
- func VerifierPageDisplayQRSIOP(c *gin.Context)
- func VerifierPageLoginExpired(c *gin.Context)
- func WsHandler(c *gin.Context)
- type BackendInfo
- type ClientAssertion
- type CredentialSchema
- type Did
- type ErrorMessage
- type Jwk
- type JwkSet
- type PacketDeliverySubject
- type ProblemDetails
- type Route
- type Routes
- type SubjectRole
- type TokenRequestBody
- type TokenResponse
Constants ¶
const DEEPLINK = "DEEPLINK"
const DEFAULT_REQUEST_MODE = verifier.REQUEST_MODE_BY_REFERENCE
const FRONTEND_V1 = "FRONTEND_V1"
const FRONTEND_V2 = "FRONTEND_V2"
Variables ¶
var ErrorMessagNoGrantType = ErrorMessage{"no_grant_type_provided", "Token requests require a grant_type."}
var ErrorMessageFailedSameDevice = ErrorMessage{"failed_same_device", "Was not able to start a same-device flow."}
var ErrorMessageInvalidAudience = ErrorMessage{"invalid_audience", "Audience of the request object was invalid."}
var ErrorMessageInvalidClientAssertion = ErrorMessage{"invalid_client_assertion", "Provided client assertion is invalid."}
var ErrorMessageInvalidRefreshToken = ErrorMessage{"invalid_refresh_token", "The provided refresh token is invalid or expired."}
var ErrorMessageInvalidRequestedTokenType = ErrorMessage{"invalid_requested_token_type", "Token exchange is only supported for requesting tokens of type urn:ietf:params:oauth:token-type:access_token."}
var ErrorMessageInvalidResponseType = ErrorMessage{"invalid_response_type", "Authentication requires the response_type to be `code`."}
var ErrorMessageInvalidSdJwt = ErrorMessage{"invalid_sdjwt", "SdJwt does not contain all required fields."}
var ErrorMessageInvalidSubjectTokenType = ErrorMessage{"invalid_subject_token_type", "Token exchange is only supported for token type urn:eu:oidf:vp_token."}
var ErrorMessageInvalidTokenRequest = ErrorMessage{"invalid_token_request", "Token request has no redirect_uri and no valid client assertion."}
var ErrorMessageNoCallback = ErrorMessage{"NoCallbackProvided", "A callback address has to be provided as query-parameter."}
var ErrorMessageNoClientId = ErrorMessage{"no_client_id_provided", "Authentication requires a client-id provided as a parameter."}
var ErrorMessageNoCode = ErrorMessage{"no_code_provided", "Token requests require a code."}
var ErrorMessageNoNonce = ErrorMessage{"no_nonce_provided", "Authentication requires a nonce provided as a query parameter."}
var ErrorMessageNoPresentationSubmission = ErrorMessage{"no_presentation_submission_provided", "Authentication requires a presentation submission provided as a form parameter."}
var ErrorMessageNoRedircetUri = ErrorMessage{"no_redirect_uri_provided", "Token requests require a redirect_uri."}
var ErrorMessageNoRefreshToken = ErrorMessage{"no_refresh_token_provided", "Refresh token requests require a refresh_token."}
var ErrorMessageNoResource = ErrorMessage{"no_resource_provided", "When using token-exchange, resource is required to provide the client_id."}
var ErrorMessageNoScope = ErrorMessage{"no_scope_provided", "Authentication requires a scope provided as a parameter."}
var ErrorMessageNoState = ErrorMessage{"no_state_provided", "Authentication requires a state provided as query parameter."}
var ErrorMessageNoSuchSession = ErrorMessage{"no_session", "Session with the requested id is not available."}
var ErrorMessageNoToken = ErrorMessage{"no_token_provided", "Authentication requires a token provided as a form parameter."}
var ErrorMessageNoWebsocketConnection = ErrorMessage{"invalid_connection", "No Websocket connection available for the authenticated session."}
var ErrorMessageUnableToDecodeCredential = ErrorMessage{"invalid_token", "Could not read the credential(s) inside the token."}
var ErrorMessageUnableToDecodeHolder = ErrorMessage{"invalid_token", "Could not read the holder inside the token."}
var ErrorMessageUnableToDecodeToken = ErrorMessage{"invalid_token", "Token could not be decoded."}
var ErrorMessageUnresolvableRequestObject = ErrorMessage{"unresolvable_request_object", "Was not able to get the request object from the client."}
var ErrorMessageUnsupportedAssertionType = ErrorMessage{"unsupported_assertion_type", "Assertion type is not supported."}
var ErrorMessageUnsupportedGrantType = ErrorMessage{"unsupported_grant_type", "Provided grant_type is not supported by the implementation."}
Functions ¶
func AuthorizationEndpoint ¶
func GetRequestByReference ¶
GetRequestByReference - Get the request object by reference
func GetTokenForService ¶
GetToken - Token endpoint to exchange the authorization code with the actual JWT.
func GetVerifierAPIAuthenticationResponse ¶
GetVerifierAPIAuthenticationResponse - Stores the credential for the given session
func StartSIOPSameDevice ¶
StartSIOPSameDevice - Starts the siop flow for credentials hold by the same device
func VerifierAPIAuthenticationResponse ¶
VerifierAPIAuthenticationResponse - Stores the credential for the given session
func VerifierAPIJWKS ¶
VerifierAPIJWKS - Provides the public keys for the given verifier, to be used for verifing the JWTs
func VerifierAPIOpenIDConfiguration ¶
VerifierAPIOpenID
func VerifierAPIStartSIOP ¶
VerifierAPIStartSIOP - Initiates the siop flow and returns the 'openid://...' connection string
func VerifierLoginQr ¶
VerifierLoginQr - Presents a qr as starting point for the auth process
func VerifierPageDisplayQRSIOP ¶
VerifierPageDisplayQRSIOP - Presents a qr as starting point for the auth process
func VerifierPageLoginExpired ¶
VerifierPageLoginExpired - Presents a page when the login session is expired
Types ¶
type BackendInfo ¶
type ClientAssertion ¶
type CredentialSchema ¶
type ErrorMessage ¶
type Jwk ¶
type Jwk struct {
Kid string `json:"kid,omitempty"`
Kty string `json:"kty,omitempty"`
Use string `json:"use,omitempty"`
Alg string `json:"alg,omitempty"`
Crv string `json:"crv,omitempty"`
X string `json:"x,omitempty"`
Y string `json:"y,omitempty"`
N string `json:"n,omitempty"`
E string `json:"e,omitempty"`
D string `json:"d,omitempty"`
}
type PacketDeliverySubject ¶
type PacketDeliverySubject struct {
Id string `json:"id,omitempty"`
FamilyName string `json:"familyName,omitempty"`
FirstName string `json:"firstName,omitempty"`
Roles []SubjectRole `json:"roles,omitempty"`
Email string `json:"email,omitempty"`
}
type ProblemDetails ¶
type ProblemDetails struct {
// An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type.
Type_ string `json:"type,omitempty"`
// A short summary of the problem type.
Title string `json:"title,omitempty"`
// The HTTP status code generated by the origin server for this occurrence of the problem.
Status float64 `json:"status,omitempty"`
// A human readable explanation specific to this occurrence of the problem.
Detail string `json:"detail,omitempty"`
// An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
Instance string `json:"instance,omitempty"`
}
type Route ¶
type Route struct {
// Name is the name of this Route.
Name string
// Method is the string for the HTTP method. ex) GET, POST etc..
Method string
// Pattern is the pattern of the URI.
Pattern string
// HandlerFunc is the handler function of this route.
HandlerFunc gin.HandlerFunc
}
Route is the information for every URI.
type SubjectRole ¶
type TokenRequestBody ¶
type TokenRequestBody struct {
// MUST be set to \"vp_token\"
GrantType string `json:"grant_type"`
// Signed Verifiable Presentation. See also the VP Token schema definition.
VpToken string `json:"vp_token"`
// Descriptor for the vp_token, linked by presentation_definition. See also the Presentation Definition schema.
PresentationSubmission string `json:"presentation_submission"`
// OIDC scope
Scope string `json:"scope"`
}
type TokenResponse ¶
type TokenResponse struct {
TokenType string `json:"token_type,omitempty"`
IssuedTokenType string `json:"issued_token_type,omitempty"`
// The lifetime in seconds of the access token
ExpiresIn float32 `json:"expires_in,omitempty"`
AccessToken string `json:"access_token,omitempty"`
// Refresh token to obtain new access tokens. Only present when refresh tokens are enabled.
RefreshToken string `json:"refresh_token,omitempty"`
// Lifetime in seconds of the refresh token. Only present when a refresh token is issued.
RefreshTokenExpiresIn int64 `json:"refresh_token_expires_in,omitempty"`
// The scope of the access token
Scope string `json:"scope,omitempty"`
// ID Token value associated with the authenticated session. Presents client's identity. ID Token is issued in a JWS format. See also the \"ID Token\" schema definition.
IdToken string `json:"id_token,omitempty"`
}