Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthorizeAccessTokenUrl = "http://45.12.238.224:8181/CSAFront/oidc/sberbank_id/authorize.do" TokenAuthorizeUrl = "http://45.12.238.224:8181/ru/prod/tokens/v2/oidc" PersonalDataUrl = "http://45.12.238.224:8181/ru/prod/sberbankid/v2.1/userInfo" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Scope string RedirectUrl string DebugMode bool // contains filtered or unexported fields }
Config is a structure to keep instance parameters for httpClient requests
type PersonData ¶
type PersonData map[string]interface{}
PersonData represents Personal Data response. JSON formatted
type SberCredentials ¶
SberCredentials is a struct to store user credentials for Sberbank ID API
type SberbankIdClient ¶
SberbankIdClient represents the main struct of a client for Sbebank ID API
func New ¶
func New(clientId, clientSecret string, config *Config) *SberbankIdClient
func (*SberbankIdClient) AuthRequest ¶
func (c *SberbankIdClient) AuthRequest() (string, error)
func (*SberbankIdClient) GetPersonalData ¶
func (c *SberbankIdClient) GetPersonalData(token *TokenResponse) (*PersonData, error)
func (*SberbankIdClient) GetToken ¶
func (c *SberbankIdClient) GetToken(authcode string) (*TokenResponse, error)
Click to show internal directories.
Click to hide internal directories.