feat: add collaborative interview scheduling
Add candidate decisions, co-interviewer accounts, scheduled interview inbox and calendar views, candidate-safe meeting links, shared documents, and private live notes backed by RabbitMQ. Extend the disposable integration environment to validate PostgreSQL migrations, seeded users, interview lifecycle behavior, and RabbitMQ fanout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
fd06fbbb5d
commit
75e3c73a61
35 changed files with 3621 additions and 58 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package security
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
|
@ -18,6 +19,22 @@ type Claims struct {
|
|||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
type claimsContextKey struct{}
|
||||
|
||||
func WithClaims(ctx context.Context, claims Claims) context.Context {
|
||||
return context.WithValue(ctx, claimsContextKey{}, claims)
|
||||
}
|
||||
|
||||
func ClaimsFromContext(ctx context.Context) (Claims, bool) {
|
||||
claims, ok := ctx.Value(claimsContextKey{}).(Claims)
|
||||
return claims, ok
|
||||
}
|
||||
|
||||
func UserIDFromContext(ctx context.Context) (uint, bool) {
|
||||
claims, ok := ClaimsFromContext(ctx)
|
||||
return claims.UserID, ok && claims.UserID != 0
|
||||
}
|
||||
|
||||
type ITokenManager interface {
|
||||
Issue(uint, string, string) (string, error)
|
||||
Parse(string) (Claims, error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue