Documentation
¶
Overview ¶
Package orcid implements the ORCID authentication API.
See also:
https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/record_2.0/README.md#scopes
Index ¶
Constants ¶
View Source
const ( AuthUrl = "https://orcid.org/oauth/authorize" TokenUrl = "https://orcid.org/oauth/token" )
Endpoints for ORCID production API
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrcidClient ¶
type OrcidClient struct {
// contains filtered or unexported fields
}
func NewOrcidClient ¶
func NewOrcidClient(redirectUrl string) (*OrcidClient, error)
func (*OrcidClient) Auth ¶
func (client *OrcidClient) Auth() http.HandlerFunc
Auth sends the user to the OAuth auth endpoint.
func (*OrcidClient) Callback ¶
func (client *OrcidClient) Callback() http.HandlerFunc
Callback handles the OAuth callback from the token endpoint.
func (*OrcidClient) GetApiClient ¶
GetApiClient takes a context and token and returns a ready HTTP client for the oauth API.
func (*OrcidClient) SetLogger ¶
func (client *OrcidClient) SetLogger(logger zerolog.Logger)
SetLogger assigns a logger to the service. It is not save to call this after instantiating any HTTP handlers.
Click to show internal directories.
Click to hide internal directories.