Documentation ¶
Index ¶
- func CreateAuthorizationRequest(reason, sender, callbackURL string) protocol.AuthorizationRequestMessage
- func CreateAuthorizationRequestWithMessage(reason, message, sender, callbackURL string) protocol.AuthorizationRequestMessage
- func VerifyState(ctx context.Context, id, s *big.Int, opts state.ExtendedVerificationsOptions) error
- type Verifier
- func (v *Verifier) FullVerify(ctx context.Context, token string, ...) (*protocol.AuthorizationResponseMessage, error)
- func (v *Verifier) VerifyAuthResponse(ctx context.Context, response protocol.AuthorizationResponseMessage, ...) error
- func (v *Verifier) VerifyJWZ(ctx context.Context, token string, opts ...pubsignals.VerifyOpt) (t *jwz.Token, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAuthorizationRequest ¶
func CreateAuthorizationRequest(reason, sender, callbackURL string) protocol.AuthorizationRequestMessage
CreateAuthorizationRequest creates new authorization request message sender - client identifier reason - describes purpose of request callbackURL - url for authorization response
func CreateAuthorizationRequestWithMessage ¶
func CreateAuthorizationRequestWithMessage(reason, message, sender, callbackURL string) protocol.AuthorizationRequestMessage
CreateAuthorizationRequestWithMessage creates new authorization request with message for signing with jwz
func VerifyState ¶
func VerifyState(ctx context.Context, id, s *big.Int, opts state.ExtendedVerificationsOptions) error
VerifyState allows to verify state without binding to verifier instance
Types ¶
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier is a struct for auth instance
func NewVerifier ¶
func NewVerifier( keyLoader loaders.VerificationKeyLoader, claimSchemaLoader loaders.SchemaLoader, resolver map[string]pubsignals.StateResolver) *Verifier
NewVerifier returns setup instance of auth library
func (*Verifier) FullVerify ¶
func (v *Verifier) FullVerify( ctx context.Context, token string, request protocol.AuthorizationRequestMessage, opts ...pubsignals.VerifyOpt, ) (*protocol.AuthorizationResponseMessage, error)
FullVerify performs verification of jwz token and auth request
func (*Verifier) VerifyAuthResponse ¶
func (v *Verifier) VerifyAuthResponse( ctx context.Context, response protocol.AuthorizationResponseMessage, request protocol.AuthorizationRequestMessage, opts ...pubsignals.VerifyOpt, ) error
VerifyAuthResponse performs verification of auth response based on auth request
Click to show internal directories.
Click to hide internal directories.