Documentation ¶
Index ¶
- type Credentials
- type SSASClient
- func (c *SSASClient) CallSSASIntrospect(tokenString string) ([]byte, error)
- func (c *SSASClient) CreateGroup(groupId, name, acoCMSID string) ([]byte, error)
- func (c *SSASClient) CreateSystem(clientName, groupID, scope, publicKey, trackingID string, ips []string) ([]byte, error)
- func (c *SSASClient) DeleteCredentials(systemID string) error
- func (c *SSASClient) DeleteGroup(id int) error
- func (c *SSASClient) GetPublicKey(systemID int) ([]byte, error)
- func (c *SSASClient) GetToken(credentials Credentials, r http.Request) (string, error)
- func (c *SSASClient) GetVersion() (string, error)
- func (c *SSASClient) Ping() error
- func (c *SSASClient) ResetCredentials(systemID string) ([]byte, error)
- func (c *SSASClient) RevokeAccessToken(tokenID string) error
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type SSASClient ¶
SSASClient is a client for interacting with the System-to-System Authentication Service.
func NewSSASClient ¶
func NewSSASClient() (*SSASClient, error)
NewSSASClient creates and returns an SSASClient.
func (*SSASClient) CallSSASIntrospect ¶
func (c *SSASClient) CallSSASIntrospect(tokenString string) ([]byte, error)
CallSSASIntrospect verifies that the tokenString presented was issued by the public server. It does so using the introspect endpoint as defined by https://tools.ietf.org/html/rfc7662
func (*SSASClient) CreateGroup ¶
func (c *SSASClient) CreateGroup(groupId, name, acoCMSID string) ([]byte, error)
CreateGroup POSTs to the SSAS /group endpoint to create a system. Note, the groupId is not the same ID that is returned. ID is generated by the system.
func (*SSASClient) CreateSystem ¶
func (c *SSASClient) CreateSystem(clientName, groupID, scope, publicKey, trackingID string, ips []string) ([]byte, error)
CreateSystem POSTs to the SSAS /system endpoint to create a system.
func (*SSASClient) DeleteCredentials ¶
func (c *SSASClient) DeleteCredentials(systemID string) error
DeleteCredentials DELETEs from the SSAS /system/{systemID}/credentials endpoint to deactivate credentials associated with the system.
func (*SSASClient) DeleteGroup ¶
func (c *SSASClient) DeleteGroup(id int) error
DeleteGroup DELETEs to the SSAS /group/{id} endpoint to delete a group.
func (*SSASClient) GetPublicKey ¶
func (c *SSASClient) GetPublicKey(systemID int) ([]byte, error)
GetPublicKey GETs the SSAS /system/{systemID}/key endpoint to retrieve a system's public key.
func (*SSASClient) GetToken ¶
func (c *SSASClient) GetToken(credentials Credentials, r http.Request) (string, error)
GetToken POSTs to the public SSAS /token endpoint to get an access token for a BCDA client
func (*SSASClient) GetVersion ¶
func (c *SSASClient) GetVersion() (string, error)
GetVersion Gets the version of the SSAS client
func (*SSASClient) Ping ¶
func (c *SSASClient) Ping() error
func (*SSASClient) ResetCredentials ¶
func (c *SSASClient) ResetCredentials(systemID string) ([]byte, error)
ResetCredentials PUTs to the SSAS /system/{systemID}/credentials endpoint to reset the system's secret.
func (*SSASClient) RevokeAccessToken ¶
func (c *SSASClient) RevokeAccessToken(tokenID string) error
RevokeAccessToken DELETEs to the public SSAS /token endpoint to revoke the token