Documentation ¶
Overview ¶
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. Licensed under the Universal Permissive License (UPL) Version 1.0 as shown at http://oss.oracle.com/licenses/upl.
Index ¶
Constants ¶
View Source
const ( // TokenKey http header key name for asserting token TokenKey = "x-token" // IdpTypeKey http header key name for idp IdpTypeKey = "x-idp" // AllowedIDDKey http header key name for allowed IDD AllowedIDDKey = "x-allowedIDD" // RequestHeaderKey http header key name for extra headers which will be passed to IDP RequestHeaderKey = "x-ecid" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssertResponse ¶
type AssertResponse struct { Principals []*adsapi.Principal `json:"principals,omitempty"` Attributes map[string]interface{} `json:"attributes,omitempty"` ErrCode int `json:"errCode"` ErrMessage string `json:"errMessage,omitempty"` }
AssertResponse assertion response
type AsserterConfig ¶
type AsserterConfig struct { Endpoint string `json:"endpoint"` CACert string `json:"caCert"` ClientCert string `json:"clientCert"` ClientKey string `json:"clientKey"` HTTPTimeout int `json:"httpTimeout"` }
AsserterConfig asserter webhook client configuration
type TokenAsserter ¶
type TokenAsserter interface { // AssertToken assert token and generate subject to represent the identity AssertToken(token string, idpType string, allowedIDD string, requestHeaders map[string]string) (*AssertResponse, error) }
TokenAsserter asserter interface
func NewAsserter ¶
func NewAsserter(conf *AsserterConfig, tenant *string) (TokenAsserter, error)
NewAsserter create asserter webhook client
type WebHookAsserter ¶
type WebHookAsserter struct { ServerEndpoint string // contains filtered or unexported fields }
WebHookAsserter implements asserter client interface
func (*WebHookAsserter) AssertToken ¶
func (a *WebHookAsserter) AssertToken(token string, idpType string, allowedIDD string, requestHeaders map[string]string) (*AssertResponse, error)
AssertToken assert token via webhook
Click to show internal directories.
Click to hide internal directories.