Create a ReservationTokenAttribute.

@param token
the token
@return newly created RequestedTransportAttribute
167704
public static ReservationTokenAttribute createReservationTokenAttribute(
			byte token[]) {
		ReservationTokenAttribute attribute = new ReservationTokenAttribute();

		attribute.setReservationToken(token);
		return attribute;
	}
1355092
private BaseLocalTransaction createLocalTransaction(String transId) {
        BaseLocalTransaction baseLocalTransaction;
        try {
            baseLocalTransaction = localTransactionConstructor.newInstance(transId, this);
        } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
            throw new RuntimeException(e);
        }
        BaseLocalTransaction.addLocalTransaction(baseLocalTransaction);
        return baseLocalTransaction;
    }
648258
def create_token(self, request, refresh_token=False):
        """"""

        if callable(self.expires_in):
            expires_in = self.expires_in(request)
        else:
            expires_in = self.expires_in

        request.expires_in = expires_in

        return self.request_validator.get_jwt_bearer_token(None, None, request)
749462
public static CreateResult create(String accessToken, DiscountCard discountCard) {
		Create<DiscountCard> card = new Create<DiscountCard>();
		card.setCard(discountCard);
		return create(accessToken, card);
	}
24996
public static String getToken(HttpServletRequest request, ActionMapping mapping)
    {
        if (mapping instanceof PageFlowActionMapping && ((PageFlowActionMapping) mapping).isPreventDoubleSubmit()) {
            HttpSession session = request.getSession();
            String token = (String) session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
            if (token != null) return token;
            token = TokenProcessor.getInstance().generateToken(request);
            request.getSession().setAttribute(Globals.TRANSACTION_TOKEN_KEY, token);
            return token;
        }

        return null;
    }
1249070
public TokenRequestBuilder getTokenEndPoint() {
    for(Authentication auth : getAuthentications().values()) {
      if (auth instanceof OAuth) {
        OAuth oauth = (OAuth) auth;
        return oauth.getTokenRequestBuilder();
      }
    }
    return null;
  }
47122
protected void createTicketGrantingTicketCheckAction(final Flow flow) {
        val action = createActionState(flow, CasWebflowConstants.STATE_ID_TICKET_GRANTING_TICKET_CHECK,
            CasWebflowConstants.ACTION_ID_TICKET_GRANTING_TICKET_CHECK);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_TGT_NOT_EXISTS, CasWebflowConstants.STATE_ID_GATEWAY_REQUEST_CHECK);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_TGT_INVALID, CasWebflowConstants.STATE_ID_TERMINATE_SESSION);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_TGT_VALID, CasWebflowConstants.STATE_ID_HAS_SERVICE_CHECK);
    }
996863
public static TokenRequest create(FullHttpRequest httpRequest) {
        if (httpRequest.headers() != null && httpRequest.headers().get(HttpHeaderNames.CONTENT_TYPE) != null
                && httpRequest.headers().get(HttpHeaderNames.CONTENT_TYPE).contains(HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED)) {
            return new TokenRequest_x_www_form_urlencoded(httpRequest);
        } else {
            return TokenRequest_json.create(httpRequest);
        }
    }
977161
public Instant getCreatedTimeFromToken(String token) {
        try {
            final Claims claims = getClaimsFromToken(token);
            return Instant.ofEpochMilli((Long) claims.get(CLAIM_KEY_CREATED));
        } catch (Exception e) {
            log.error("get created Time from jwt token error : {}", e.getMessage());
            return null;
        }
    }
415552
public String createToken(int ttl) {
        checkArgument(ttl > 0);

        CreateTokenRequest request = new CreateTokenRequest();
        request.setTtl(ttl);
        InternalRequest internalRequest = createRequest(request, HttpMethodName.POST, null, TOKEN);
        CreateTokenResponse response = this.invokeHttpClient(internalRequest, CreateTokenResponse.class);
        return response.getToken();
    }
293907
protected Locator createLocator(final Token t) {
        return new Locator(getInputSource().getURI(),
            t == null ? 0 : t.beginLine,
            t == null ? 0 : t.beginColumn);
    }
1246616
public static SematextClient newInstance(String token) {
    if (token == null) {
      throw new IllegalArgumentException("Token should be defined.");
    }
    return newInstance(new ClientProperties(token, null, null));
  }
827582
@SuppressWarnings("unchecked")
    public BytesRef bytesRef(Token token) {
        ByteBuffer bb = factory.toByteArray(token);
        byte[] bytes = ByteBufferUtils.asArray(bb);
        return new BytesRef(bytes);
    }
326710
public static CreateResult create(String accessToken, Create<?> card) {
		return create(accessToken, JsonUtil.toJSONString(card));
	}
671531
@SuppressWarnings("all")
    public JwtAuth getJwtAuth(String token) {
        Claims claims = this.getClaimsFromToken(token);
        List<String> roles = (List<String>) claims.get(CLAIM_KEY_ROLE);
        return new JwtAuth((String) claims.get(CLAIM_KEY_ID), (String) claims.get(CLAIM_KEY_LOGIN_NAME), (String) claims.get(CLAIM_KEY_MICK_NAME), (String) claims.get(CLAIM_KEY_AVATAR), Lists.iterable(roles) ? roles : Lists.newArrayList());
    }
1033159
public Payment createWithToken( String token ) {
    ValidationUtils.validatesToken( token );

    ParameterMap<String, String> params = new ParameterMap<String, String>();
    params.add( "token", token );

    return RestfulUtils.create( PaymentService.PATH, params, Payment.class, super.httpClient );
  }
259032
public synchronized void initialiseFromAPIToken(final String token)
	{
		final String responseStr = authService.getToken(UserManagerOAuthService.GRANT_TYPE_TOKEN_EXCHANGE,
		                                                null,
		                                                getOwnCallbackUri().toString(),
		                                                clientId,
		                                                clientSecret,
		                                                null,
		                                                null,
		                                                null,
		                                                token);

		loadAuthResponse(responseStr);
	}