Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidProvider = errors.New("invalid provider")
)
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct { OAuth2 *oauth2.Config Provider string ADHBase string Rostered bool Store sessions.Store }
func NewAuthService ¶
func NewAuthService(store sessions.Store, oauth2provider string) *AuthService
func (*AuthService) GetUserInfo ¶
Queries the userinfo endpoint with the provided oauth2 token. Will return the CID if available, whether or not the user is ok to use the system, and any errors that may have occurred.
The criteria to determine if a user can use the system is: - Are they a VATSIM member? - If facility.adh.base_api is set and the facility.adh.rostered bool in config is true, are they rostered?
func (*AuthService) Session ¶
func (s *AuthService) Session(r *http.Request, w http.ResponseWriter) *AuthServiceSessions
type AuthServiceSessions ¶
type AuthServiceSessions struct { Session *sessions.Session // contains filtered or unexported fields }
func (*AuthServiceSessions) Delete ¶
func (s *AuthServiceSessions) Delete(key string)
func (*AuthServiceSessions) Get ¶
func (s *AuthServiceSessions) Get(key string) interface{}
func (*AuthServiceSessions) Save ¶
func (s *AuthServiceSessions) Save()
func (*AuthServiceSessions) Set ¶
func (s *AuthServiceSessions) Set(key string, value interface{})
Click to show internal directories.
Click to hide internal directories.