Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Name represents name of the service Name = "authorization-service" // AuthorizationRequestMessageType defines auth request type of the communication protocol AuthorizationRequestMessageType types.ProtocolMessage = protocol.ProtocolName + "/authorization-request/v1" // AuthorizationResponseMessageType defines auth response type of the communication protocol AuthorizationResponseMessageType types.ProtocolMessage = protocol.ProtocolName + "/authorization-response/v1" )
Variables ¶
This section is empty.
Functions ¶
func CreateAuthorizationRequest ¶
func CreateAuthorizationRequest(aud, callbackURL string) *types.AuthorizationMessageRequest
CreateAuthorizationRequest creates new authorization request message
Types ¶
type UserToken ¶
type UserToken struct { ID string `json:"id"` Challenge string `json:"challenge"` State string `json:"state"` Scope map[string]map[string]interface{} `json:"scope"` }
UserToken is token that can be used for user authorization
func ExtractMetadata ¶
ExtractMetadata extract userToken from provided proofs
func (*UserToken) Update ¶ added in v0.0.5
func (token *UserToken) Update(scopeID string, metadata types.ProofMetadata) error
Update adds new metadata to user token
func (*UserToken) VerifyState ¶
func (token *UserToken) VerifyState(ctx context.Context, url, addr string) (verification.StateVerificationResult, error)
VerifyState verifies state that is stored in the token
Click to show internal directories.
Click to hide internal directories.