Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultVerificationOptions = VerificationOptions{SkipNodeClaimCheck: false}
DefaultVerificationOptions default options
View Source
var ErrAuthorizationGrantTokenMissing = errors.New("token must be set")
ErrAuthorizationGrantTokenMissing blank authorization token
View Source
var ErrCodeVerifierMissing = errors.New("no code verifier generated")
ErrCodeVerifierMissing code verifier is missing
View Source
var ErrMystnodesAuthorizationFail = errors.New("mystnodes SSO grant authorization verification failed")
ErrMystnodesAuthorizationFail authorization failed against mystnodes
View Source
var ErrNoUnlockedIdentity = errors.New("lastUnlockedIdentity must not be empty")
ErrNoUnlockedIdentity no unlocked identity
View Source
var ErrRedirectMissing = errors.New("host must not be empty")
ErrRedirectMissing host can't be blank
Functions ¶
This section is empty.
Types ¶
type Mystnodes ¶
type Mystnodes struct {
// contains filtered or unexported fields
}
Mystnodes SSO support
func NewMystnodes ¶
func NewMystnodes(signer identity.SignerFactory, client httpClient) *Mystnodes
NewMystnodes constructor
func (*Mystnodes) VerifyAuthorizationGrant ¶
func (m *Mystnodes) VerifyAuthorizationGrant(authorizationGrantToken string, opts VerificationOptions) (VerifyInfo, error)
VerifyAuthorizationGrant verifies authorization grant against mystnodes.com using PKCE workflow
type MystnodesMessage ¶
type MystnodesMessage struct { CodeChallenge string `json:"codeChallenge"` Identity string `json:"identity"` RedirectURL string `json:"redirectUrl"` // http://guillem.nodeUI }
MystnodesMessage expected by mystnodes.com
func (MystnodesMessage) JSON ¶
func (msg MystnodesMessage) JSON() ([]byte, error)
JSON convenience receiver to convert MystnodesMessage struct to []byte
type VerificationOptions ¶
type VerificationOptions struct {
SkipNodeClaimCheck bool
}
VerificationOptions options
type VerifyInfo ¶
type VerifyInfo struct { APIkey string `json:"apiKey"` WalletAddress string `json:"walletAddress"` IsEligibleForFreeRegistration bool `json:"isEligibleForFreeRegistration"` }
VerifyInfo information gathered during grant verification
Click to show internal directories.
Click to hide internal directories.