Documentation ¶
Index ¶
Constants ¶
View Source
const ( INVALID_REQUEST = "INVALID_REQUEST" INVALID_TICKET_SPEC = "INVALID_TICKET_SPEC" UNAUTHORIZED_SERVICE = "UNAUTHORIZED_SERVICE" UNAUTHORIZED_SERVICE_PROXY = "UNAUTHORIZED_SERVICE_PROXY" INVALID_PROXY_CALLBACK = "INVALID_PROXY_CALLBACK" INVALID_TICKET = "INVALID_TICKET" INVALID_SERVICE = "INVALID_SERVICE" INTERNAL_ERROR = "INTERNAL_ERROR" )
AuthenticationError Code values
Variables ¶
View Source
var (
InvalidCredentials = errors.New("Bad username or password")
)
Functions ¶
This section is empty.
Types ¶
type AuthenticationError ¶
AuthenticationError represents a CAS AuthenticationFailure response
func (AuthenticationError) AuthenticationError ¶
func (e AuthenticationError) AuthenticationError() bool
AuthenticationError provides a differentiator for casting.
func (AuthenticationError) Error ¶
func (e AuthenticationError) Error() string
Error returns the AuthenticationError as a string
type AuthenticationResponse ¶
type AuthenticationResponse struct { User string // Users login name ProxyGrantingTicket string // Proxy Granting Ticket Proxies []string // List of proxies AuthenticationDate time.Time // Time at which authentication was performed IsNewLogin bool // Whether new authentication was used to grant the service ticket IsRememberedLogin bool // Whether a long term token was used to grant the service ticket MemberOf []string // List of groups which the user is a member of Attributes UserAttributes // Additional information about the user }
AuthenticationResponse captures authenticated user information
func ParseServiceResponse ¶
func ParseServiceResponse(data []byte) (*AuthenticationResponse, error)
ParseServiceResponse returns a successful response or an error
type Client ¶
func (*Client) AuthenticateUser ¶
type UserAttributes ¶
UserAttributes represents additional data about the user
func (UserAttributes) Add ¶
func (a UserAttributes) Add(name, value string)
Add appends a new attribute.
func (UserAttributes) Get ¶
func (a UserAttributes) Get(name string) string
Get retrieves an attribute by name.
Attributes are stored in arrays. Get will only return the first element.
Click to show internal directories.
Click to hide internal directories.