Documentation ¶
Overview ¶
Copyright 2017 Tink AB
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Tink AB ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Tink AB ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Tink AB ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type AuthenticateRequest
- type FilesystemU2FStore
- type NextURLCallback
- type OAuthProvider
- type OAuthSettings
- type ServiceAccount
- type SuccesCallback
- type U2FFile
- type U2FProvider
- func (p *U2FProvider) Handler(c context.Context, s *session.LoginSession)
- func (p *U2FProvider) RegisterRequestHandler(c context.Context, s *session.LoginSession)
- func (p *U2FProvider) RegisterResponseHandler(c context.Context, s *session.LoginSession)
- func (p *U2FProvider) SignRequestHandler(c context.Context, s *session.LoginSession)
- func (p *U2FProvider) SignResponseHandler(c context.Context, s *session.LoginSession)
- type U2FStore
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticateRequest ¶
type AuthenticateRequest struct {
SignRequests []u2f.SignRequest `json:"signRequests"`
}
U2F Authentication request.
type FilesystemU2FStore ¶
type FilesystemU2FStore struct {
// contains filtered or unexported fields
}
func NewFilesystemU2FStore ¶
func NewFilesystemU2FStore(path string) *FilesystemU2FStore
func (*FilesystemU2FStore) IncreaseCounter ¶
func (s *FilesystemU2FStore) IncreaseCounter(user string, i int, c uint32) error
func (*FilesystemU2FStore) Register ¶
func (s *FilesystemU2FStore) Register(user string, reg u2f.Registration) error
func (*FilesystemU2FStore) Registrations ¶
func (s *FilesystemU2FStore) Registrations(user string) ([]*u2f.Registration, error)
type NextURLCallback ¶
type NextURLCallback func(*session.LoginSession) string
type OAuthProvider ¶
type OAuthProvider struct {
// contains filtered or unexported fields
}
func NewOAuth ¶
func NewOAuth(sa ServiceAccount, oa OAuthSettings, successCallback SuccesCallback, nextURLCallback NextURLCallback) *OAuthProvider
func (*OAuthProvider) CallbackHandler ¶
func (p *OAuthProvider) CallbackHandler(c context.Context, s *session.LoginSession)
func (*OAuthProvider) Login ¶
func (p *OAuthProvider) Login(c context.Context, s *session.LoginSession)
type OAuthSettings ¶
type ServiceAccount ¶
type SuccesCallback ¶
type SuccesCallback func(context.Context, *session.LoginSession)
type U2FFile ¶
type U2FFile struct { Registrations []*u2f.Registration Counters []uint32 }
type U2FProvider ¶
type U2FProvider struct {
// contains filtered or unexported fields
}
func NewU2F ¶
func NewU2F(appID string, trustedFacets []string, store U2FStore, successCallback SuccesCallback, nextURLCallback NextURLCallback) *U2FProvider
func (*U2FProvider) Handler ¶
func (p *U2FProvider) Handler(c context.Context, s *session.LoginSession)
func (*U2FProvider) RegisterRequestHandler ¶
func (p *U2FProvider) RegisterRequestHandler(c context.Context, s *session.LoginSession)
func (*U2FProvider) RegisterResponseHandler ¶
func (p *U2FProvider) RegisterResponseHandler(c context.Context, s *session.LoginSession)
func (*U2FProvider) SignRequestHandler ¶
func (p *U2FProvider) SignRequestHandler(c context.Context, s *session.LoginSession)
func (*U2FProvider) SignResponseHandler ¶
func (p *U2FProvider) SignResponseHandler(c context.Context, s *session.LoginSession)
type User ¶
type User struct { Sub string `json:"sub"` Name string `json:"name"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Profile string `json:"profile"` Picture string `json:"picture"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` Gender string `json:"gender"` }
User is a retrieved and authentiacted user.