Exemplo n.º 1
0
        public IToken IssueAccessToken(IAuthorizationGrant grant)
        {
            //typically here you'd fetch your access
            AccessToken token = new AccessToken
            {
                ExpiresIn = 120,
                Token     = Guid.NewGuid().ToString(),
                Grant     = (AuthorizationGrant)grant
            };

            token.Scope = ((AuthorizationGrant)grant).Scope.Split(' ');

            TokenRepo.AddAccessToken(token);
            return(token);
        }